UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E44cQ/Q8Zam4BFGbtJmlQ3RS9mtCKpmR38PdndZng18='
WHERE
key_id = '2e0f775eceaeeddef7b3c86ca958c132f39bb130c7cbf309be5c0e6e76af9087'
AND (
token = 'E44cQ/Q8Zam4BFGbtJmlQ3RS9mtCKpmR38PdndZng18='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)