UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LCHTrsQ7njZFr4OtQs1JffWTmvb/mbOG+RKh5es6/Ng='
WHERE
key_id = '4aa07912d68744f6f90e2d55f76fa2259f15b841731c2f1340a66699e4e2c477'
AND (
token = 'LCHTrsQ7njZFr4OtQs1JffWTmvb/mbOG+RKh5es6/Ng='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)