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

Query time 0.00036