UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FJ+o4Enq6Q4O0V4/znJ1mYOx1ldbL9s+LSflNg1BtME='
WHERE
key_id = 'c9586a7459bbc87788db199a3c83c2f11de4c978a859856b571c8efb4c744701'
AND (
token = 'FJ+o4Enq6Q4O0V4/znJ1mYOx1ldbL9s+LSflNg1BtME='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)