UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '75jUeWwawoB/sTxzclwBvOHCZ9LxZm7pAjIqyUpuiVM=' 
WHERE 
  key_id = 'a1a43bbd2ec6d45fdef185a8fb65249eb9d3c442a7d8b6a2da7f6a46031a66e5' 
  AND (
    token = '75jUeWwawoB/sTxzclwBvOHCZ9LxZm7pAjIqyUpuiVM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00108