UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6p2oh4Y9OkPO5uayeuy143WIBcm/nAsy6WNbSlumnGI='
WHERE
key_id = '6734754168fe062792814a34d528b0c80ff825c4a0092f9f218f4072b96b4af1'
AND (
token = '6p2oh4Y9OkPO5uayeuy143WIBcm/nAsy6WNbSlumnGI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)