UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2uPXrai4leYxaGAJ1rNkirFDHWb8NnBSP6b9cqGqejg=' 
WHERE 
  key_id = 'ed0a20ddad87e5985c324139ffca3f444bf1c2eef6fbddc63d163bb116db23e2' 
  AND (
    token = '2uPXrai4leYxaGAJ1rNkirFDHWb8NnBSP6b9cqGqejg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036