UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0E1FSUSeJsdPIamZaVIwVOp62ZRbWfO3fDee5u08D9I='
WHERE
key_id = '9732aeb574db8df94f3d2cb3aa51ab07835796fc6ddc5d2974895e71b8d5caa3'
AND (
token = '0E1FSUSeJsdPIamZaVIwVOp62ZRbWfO3fDee5u08D9I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)