UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EZU9bmidxdcHlBWepGHWP3t/T5ibzXxBx6oBQ2pODfM='
WHERE
key_id = '4833a5e5e3eb415498ddcd20507a0da94af9a14861ddd6932f93c039370880b3'
AND (
token = 'EZU9bmidxdcHlBWepGHWP3t/T5ibzXxBx6oBQ2pODfM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)