UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6ntO3jrrUF5Se2KwhIeeyhrxhYuHdhb0D77sBJovKyg=' 
WHERE 
  key_id = 'efb96560c54c3421dd55faf5974baef3fff7820f0aa0ab59aeb9f6874d932d77' 
  AND (
    token = '6ntO3jrrUF5Se2KwhIeeyhrxhYuHdhb0D77sBJovKyg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042