UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LmZ/4uDg0VNO9oVa2YerjRAa3qmUOw6ujKJN4/pWcbU='
WHERE
key_id = '368761a5d58c0ecb50808d426b573f8628d5c7062d27f8e9bdea2d0f54f62c60'
AND (
token = 'LmZ/4uDg0VNO9oVa2YerjRAa3qmUOw6ujKJN4/pWcbU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)