UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eqha9/jfL2A/0jFGgicAKzl3BC9AkEWCmF16rqMT0Eo='
WHERE
key_id = '849bd8d8c23eed4ad4f3240a9d610b1b3d535ee49cada468058327e5ece83b81'
AND (
token = 'eqha9/jfL2A/0jFGgicAKzl3BC9AkEWCmF16rqMT0Eo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)