UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FpGrSplNdMeqbwgR9t8PYnYA2xozjx+t1lD/1JAKzpA='
WHERE
key_id = '896473f44dd8b95e532f8d919e15e32b8a32f158e64e5efefac3c9301a65ac44'
AND (
token = 'FpGrSplNdMeqbwgR9t8PYnYA2xozjx+t1lD/1JAKzpA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)