UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MlEakoKIiPczyJ9OiOj4RnyZkxJ/xSZcRYG6rbai/ss=' 
WHERE 
  key_id = '6f5785cdb7458f437db03130d9659dbf1c175449f2d3d9aa019cc7fd5925abd4' 
  AND (
    token = 'MlEakoKIiPczyJ9OiOj4RnyZkxJ/xSZcRYG6rbai/ss=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023