UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/dL3Tt1JQfwJ5n20KqBvbR3VbwXCfjBqM9IswvS2UKM=' 
WHERE 
  key_id = 'd88ea7d4864c12f5f6a9fb63e254b38de8eba1a689157cb3b471a54383f3611c' 
  AND (
    token = '/dL3Tt1JQfwJ5n20KqBvbR3VbwXCfjBqM9IswvS2UKM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019