UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PIq2lShyonUIqS3U0veO8/ZzpdlXOMrM0boZ84lmzas='
WHERE
key_id = '1fc6a36cf336300275a3b0f5564a4c57a35eac7407480391bffb144f94ad8212'
AND (
token = 'PIq2lShyonUIqS3U0veO8/ZzpdlXOMrM0boZ84lmzas='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)