UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zbX2phZXmFl1SxAcVyUjbsvaJGiYCR7ruM5nsSEGyE8='
WHERE
key_id = '52fef7ab29498be1207759d167b7bb5c48506d0679c70ab1ee40452a2b77fdc5'
AND (
token = 'zbX2phZXmFl1SxAcVyUjbsvaJGiYCR7ruM5nsSEGyE8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)