UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wUCiyCgQwtjwfl9Mgu56RL9z+NS+bgHNCmn4vl9IXkc='
WHERE
key_id = '93f63c07c8c11928b0767ca41d130f84f40aa5c32f140f2ea49e1bff45cf1cdb'
AND (
token = 'wUCiyCgQwtjwfl9Mgu56RL9z+NS+bgHNCmn4vl9IXkc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)