UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GDde4OS3VmUY85EQpUSSu6oAByKsSDetGfhILL43zP8='
WHERE
key_id = '75d526d31fad185b9b28b001d3ce8daa9964f6c2d4c1af4fea8a5aed2584037d'
AND (
token = 'GDde4OS3VmUY85EQpUSSu6oAByKsSDetGfhILL43zP8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)