UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FPlWMDhIi0mQxcrSsZwR7VW22vPAxB3xOP3CRZES8Yc='
WHERE
key_id = '26fa6bdb67758f27e6fe9605a3b8dd81b5d5d5b352e3346463ee9460240920e3'
AND (
token = 'FPlWMDhIi0mQxcrSsZwR7VW22vPAxB3xOP3CRZES8Yc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)