UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'AVNUcfmhRFedTy5LG9O0wg20E9fFGZtEjvtZWdd3HMA=' 
WHERE 
  key_id = '2c299c64ef6d9222191c4ac45de5f4cbacb5b6a9337e21ed03795adbe2e36f97' 
  AND (
    token = 'AVNUcfmhRFedTy5LG9O0wg20E9fFGZtEjvtZWdd3HMA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00184