UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nKee1eb5z67dQXuBGFeKDn+nXnIurL/5tjCgCZqi0Rw='
WHERE
key_id = '3c92d2ae9531670f4d219987e33d91477cb6b8dc755260c85f9b0235764026a1'
AND (
token = 'nKee1eb5z67dQXuBGFeKDn+nXnIurL/5tjCgCZqi0Rw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)