UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'E1XNRADSiqCKlU9nJu838JgSAewLLqd6GHKMdlornZM=' 
WHERE 
  key_id = 'cbd954299118e6a9656bb330f50cdd1b2230e95bb1834bf2a26baa718bdb7a44' 
  AND (
    token = 'E1XNRADSiqCKlU9nJu838JgSAewLLqd6GHKMdlornZM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029