UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2WSEQgqbuLXxP8mjnyTkSMlDyuiEdaHys5OO6Ynma38='
WHERE
key_id = '73088887fe096bfc201db6717d3947d9c50ff7e2cc39a16b105e46fba727b63f'
AND (
token = '2WSEQgqbuLXxP8mjnyTkSMlDyuiEdaHys5OO6Ynma38='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)