UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'CYiXJBdS63qv3bhtCgsktcD9oJF9Pe/W1w9zUjfSezo=' 
WHERE 
  key_id = '267db9fd6dfc8213491b8af465141bda6cbf632e85c2fa7a35e77ed648d5c782' 
  AND (
    token = 'CYiXJBdS63qv3bhtCgsktcD9oJF9Pe/W1w9zUjfSezo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029