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

Query time 0.00030