UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2kaRqZKEm6uhu659E47jwA+3vA1XKWNo6cCijN/57JE='
WHERE
key_id = '602b8d6af4d5e8d60d1a6dae058f33fe1833d648339f3a26036cb9c728e1292b'
AND (
token = '2kaRqZKEm6uhu659E47jwA+3vA1XKWNo6cCijN/57JE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)