UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hUtcfswWPybbIQ07Pe8onGt+XBAEez+HD18FL0K9hcY='
WHERE
key_id = '03408294014dafbf496af161187682964f89bb809655465be0efa6fed80dc31e'
AND (
token = 'hUtcfswWPybbIQ07Pe8onGt+XBAEez+HD18FL0K9hcY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)